package com.hucheng.consumer.movie.config;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author: 胡成
 * @Version: 0.0.1V
 * @Date: 2019-05-28
 * @Description: 负载均衡自定义配置
 **/
@Configuration
public class RibbonConfiguration {
    @Bean
    public IRule ribbonRule() {
        //负载均衡规则改为随机
        return new RandomRule();
    }
}
